﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace LightCAD.Core
{
    public class Spline2d : ICurve2d
    {
        public Curve2dType Type =>  Curve2dType.Spline2d;

        [JsonIgnore]
        public bool IsClosed => false;
        [JsonIgnore]
        public object Source { get; set; }
        public string Name { get ; set ; }


        public void Copy(ICurve2d src)
        {
            var spline = src as Spline2d;
             this.Name = spline.Name;
        }
        public ICurve2d Clone()
        {
            var newObj = new Spline2d();
            newObj.Copy(this);
            return newObj;
        }
        object ICloneable.Clone()
        {
            return this.Clone();
        }

    }
}
